package com.atmilan.quartz.model.dto.im;

import java.math.BigDecimal;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.Data;

/**
 * im商品映射对象
 * @Description: 
 * @author daigb
 * @date 2021-04-29
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class ImProductSkuResDTO {
    /**
     * 请求编码
     */
    @JsonProperty(value = "code")
    private Integer code;

    /**
     * 成功标识
     */
    @JsonProperty(value = "success")
    private String success;
    
    /**
     *响应信息
     */
    @JsonProperty(value = "message")
    private String message;
    
    /**
     * 异常信息
     */
    @JsonProperty(value = "error")
    private String error;
    
    /**
     * 时间戳
     */
    @JsonProperty(value = "timestamp")
    private Long timestamp;

    /**
     * 请求结果
     */
    @JsonProperty(value = "data")
    private List<Result> results;
    
    /**
     * 返回结果
     * @Description: 
     * @author daigb
     * @date 2021-03-23
     */
    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Result {
        /**
         * 响应游标
         */
        @JsonProperty(value = "productId")
        private Integer productId;
        
        /**
         * 响应体
         */
        @JsonProperty(value = "items")
        private List<ImProductItemDTO> imProductItemDTOs;
        
    }
    
    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class ImProductItemDTO {
        /**
         * skuid
         */
        @JsonProperty(value = "itemId")
        private String itemId;
        
        /**
         * 尺码
         */
        @JsonProperty(value = "size")
        private String size;
        
        /**
         * 吊牌价
         */
        @JsonProperty(value = "retailPrice")
        private BigDecimal retailPrice;
        
        /**
         * 结算价
         */
        @JsonProperty(value = "salePrice")
        private BigDecimal salePrice;
        
        /**
         * 库存数
         */
        @JsonProperty(value = "qty")
        private Integer qty;
        
        /**
         * 是否可售
         */
        @JsonProperty(value = "status")
        private Integer status;
        
    }
    
}
